package com.qlk.odcinterface.dao.impl;

import com.qlk.common.dao.mybatis.BaseDao;
import com.qlk.odcinterface.dao.PmsFullCutItemDao;
import com.qlk.odcinterface.domain.PmsFullCutItem;
import com.qlk.odcinterface.domain.query.PmsFullCutItemQuery;

import java.util.List;
import org.springframework.stereotype.Repository;

/**
 * PmsFullCutItemDAO实现类<br/>
 * 对'单品促销明细表'表进行基本的操作
 * 
 * @author zhaoyanan
 * @version 2016-4-14 13:22:58
 * 
 */
@Repository
public class PmsFullCutItemDaoImpl extends BaseDao implements PmsFullCutItemDao {
    /** namespace */
    private final String namespace = PmsFullCutItemDaoImpl.class.getName();
    
    /**
     * {@inheritDoc}
     */
    public List<PmsFullCutItem> queryPmsFullCutItemList(PmsFullCutItemQuery queryBean) {
        return (List<PmsFullCutItem>) queryForList(namespace +".queryPmsFullCutItemList", queryBean);
    }

    /**
     * {@inheritDoc}
     */
    public boolean insert(PmsFullCutItem pmsFullCutItem) {
        return insert(namespace +".insert", pmsFullCutItem);
    }

    /**
     * {@inheritDoc}
     */
    public boolean update(PmsFullCutItem pmsFullCutItem) {
        return update(namespace +".update", pmsFullCutItem);
    }

    /**
     * {@inheritDoc}
     */
    public int queryPmsFullCutItemCount(PmsFullCutItemQuery queryBean) {
        return (Integer) queryForObject(namespace +".queryPmsFullCutItemCount", queryBean);
    }

    /**
     * {@inheritDoc}
     */
    public List<PmsFullCutItem> queryPmsFullCutItemListWithPage(PmsFullCutItemQuery queryBean) {
        return (List<PmsFullCutItem>) queryForList(namespace +".queryPmsFullCutItemListWithPage", queryBean);
    }

    /**
     * {@inheritDoc}
     */
    public boolean delete(PmsFullCutItem configuration) {
        return delete(namespace +".delete", configuration);
    }

    /**
     * {@inheritDoc}
     */
    public PmsFullCutItem getPmsFullCutItemById(Long id) {
        return (PmsFullCutItem) queryForObject(namespace +".getPmsFullCutItemById", id);
    } 
    
    /**
     * {@inheritDoc}
     */
    public boolean exist(PmsFullCutItem pmsFullCutItem) {
        int count = (Integer) queryForObject(namespace +".exist", pmsFullCutItem);
        return count > 0;
    }
}
